// 全局调整element-ui
@import url('./variable.less');
@import url('./mixins.less');

.ant-notification {
  z-index: 2099;
}

.el-dialog__title {
  font-size: calc(@font-size-ctent + 4px);
}

.el-radio-button--mini .el-radio-button__inner {
  padding-left: @spacing-row-sm;
  padding-right: @spacing-row-sm;
  font-size: calc(@font-size-ctent - 2px);
}

.el-tabs__item {
  font-size: @font-size-ctent;
}

.el-tag.el-tag--purple{
  color: @text-color-purple;
  background-color: mix(@text-color-purple, white, 20%);
  border-color: mix(@text-color-purple, white, 20%);
}

.el-button {
  opacity: 0.8;
}

.plTableBox .el-table__fixed-right::before, .plTableBox .el-table__fixed::before {
  height: 0 !important;
}

.el-autocomplete-suggestion {
  width: auto !important;
  li {
    font-size: @font-size-ctent;
  }
}

.el-loading-mask {
  background-color: rgba(0, 0, 0, 0.5);
}

.el-button--mini {
  font-size: @font-size-ctent;
}

.el-pager li, .el-pagination span:not([class*=suffix]) {
  font-size: @font-size-ctent !important;
}

.el-timeline {
  font-size: @font-size-ctent;
}

.el-dialog__body {
  font-size: @font-size-ctent;
  padding: @spacing-col-mini @spacing-row-base;
}

.el-form-item__label {
  font-size: @font-size-ctent;
}

.el-form-item__content {
  font-size: @font-size-ctent;
}

.el-select-dropdown__empty {
  font-size: @font-size-ctent;
}

.el-select-dropdown__item {
  font-size: @font-size-ctent;
}

.el-picker-panel__shortcut {
  font-family: @font-family;
}

.el-button {
  font-family: @font-family;
}

.el-dialog {
  position: absolute;
  top: 50% !important;
  left: 50% !important;
  margin: 0 !important;
  transform: translate(-50%, -50%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  .el-dialog__body {
    overflow: auto;
    position: relative;
  }
  &.is-fullscreen {
    max-height: 100vh;
    .el-dialog__body {
      flex-grow: 1;
    }
  }
}

.ulink-dialog-super {
  .el-dialog {
    width: 90%;
    min-width: 1000px;
    max-width: 1200px;
  }
}

.ulink-dialog-cash {
  overflow-y: hidden;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  position: absolute;
  .el-breadcrumb {
    font-size: calc(@font-size-ctent + 2px);
  }
  .el-dialog__headerbtn {
    top: @spacing-col-base;
  }
  .el-dialog__header {
    padding: @spacing-col-base @spacing-row-base;
  }
  .el-dialog__body {
    flex: 1;
  }
  .el-dialog {
    width: 100%;
    min-width: 1000px;
    height: 100%;
    top: 0 !important;
    bottom: 0 !important;
    transform: translate(-50%, 0);
  }
}

.ulink-dialog-super-mini {
  .el-dialog {
    width: 86%;
    min-width: 900px;
    max-width: 1100px;
  }
}

.ulink-dialog-mini {
  .el-dialog {
    width: 20%;
    min-width: 380px;
  }
}

.ulink-dialog-small {
  .el-dialog {
    width: 30%;
    min-width: 480px;
    max-width: 560px;
  }
}

.ulink-dialog-min-height {
  .el-dialog .el-dialog__body {
    min-height: 300px;
  }
}

.ulink-dialog-medium {
  .el-dialog {
    width: 45%;
    min-width: 740px;
    max-width: 920px;
  }
}
.ulink-dialog-height {
  .el-dialog {
    height: 80vh;
    .el-dialog__body {
       flex: 1;
    }
  }
}
.ulink-dialog-height-mini {
  .el-dialog {
    height: 70vh;
    .el-dialog__body {
      flex: 1;
    }
  }
}

.ulink-dialog-height-small {
  .el-dialog {
    height: 60vh;
    .el-dialog__body {
      flex: 1;
    }
  }
}

.ulink-dialog-large-group {
  .el-dialog {
    width: 60%;
    min-width: 880px;
    max-width: 950px;
    height: 680px;
  }
}

.ulink-dialog-large {
  .el-dialog {
    width: 75%;
    min-width: 980px;
    max-width: 1180px;
  }
}

.ulink-tree-small {
  overflow-y: auto;
  overflow-x: hidden;
  .el-tree-node__label {
    font-size: @font-size-ctent;
  }
}

.el-menu--horizontal .el-submenu__icon-arrow {
  margin-right: -8px;
}
.ulink-menu-base_popper-class {
  .el-menu-item {
    height: 40px;
    line-height: 40px;
  }
}
.ulink-menu-base {
  color: @text-color;
  &.el-menu {
    border-right: none;
    // 收缩
    &.el-menu--collapse {
      width: 100%;
      .el-tooltip, .el-submenu__title {
        padding: 0px 0px !important;
        text-align: center;
      }
    }
    .el-menu-item.is-active {
      background-color: rgba(64, 158, 255, .1);
      color: @color-primary;
      position: relative;
      &:after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 4px;
        background-color: @color-primary;
      }
    }
    .el-submenu .el-menu-item, .el-submenu__title, .el-menu-item {
      height: 40px;
      line-height: 40px;
    }
    .el-submenu.is-active {
      .el-submenu__title, .icon-big, .el-submenu__icon-arrow {
        color: @color-primary;
      }
    }
  }
  .icon-big {
    font-size: 20px;
    color: @text-color;
  }
}

.ulink-menu-small {
  background-color: transparent;
  border-right: none;
  overflow: hidden;
  flex: 1;
  &.active-bold {
    .el-menu-item {
      &.is-active {
        font-weight: bold;
      }
    }
  }
  .el-menu {
    background-color: transparent;
  }
  .el-submenu__icon-arrow {
    margin-right: -@icon-size-base;
  }
  .el-menu-item {
    font-size: @font-size-ctent;
    height: @height-menu;
    line-height: @height-menu;
    padding: 0 @spacing-row-sm !important;
    color: @text-color-grey;
    background-color: transparent !important;
    &.is-active {
      color: @color-primary;
    }
    &:hover {
      background-color: @bg-color-hover !important;
    }
  }
  .el-submenu {
    .el-submenu__title {
      font-size: @font-size-ctent;
      padding: 0 @spacing-row-sm !important;
      height: @height-menu;
      line-height: @height-menu;
      color: @text-color-grey;
      &:hover {
        background-color: @bg-color-hover !important;
        color: @text-color;
      }
    }
    .el-menu-item {
      height: @height-menu;
      line-height: @height-menu;
      padding-left: @spacing-row-sm * 3 !important;
      min-width: auto;
    }
  }
}

.el-date-editor.el-input, .el-date-editor.el-input__inner {
  width: auto;
}

.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
  margin-bottom: @spacing-col-base;
}

.el-checkbox {
  font-size: @font-size-ctent;
  margin-right: @spacing-row-sm;
  .el-checkbox__label {
    font-size: @font-size-ctent;
    padding-left: @spacing-row-mini;
  }
  .extend-click(relative)
}

.el-dropdown-menu__item {
  font-size: @font-size-ctent;
}

.el-input__inner {
  font-size: @font-size-ctent;
}

.el-input {
  input::placeholder {
    font-size: @font-size-ctent;
  }
}

.el-select {
  width: 100%;
}

.el-popover {
  font-size: @font-size-ctent;
  min-width: auto;
}

.el-message-box__btns {
  text-align: center;
}

.el-message-box {
  width: 320px;
  padding-bottom: 20px;
}

.el-button {
  height: @height-button !important;
  line-height: @height-button !important;
  padding: 0 @spacing-row-sm !important;
}

.el-dialog__footer {
  padding: 0px 20px 10px;
}

.el-timeline-item__timestamp {
  font-size: @font-size-ctent;
}

.el-cascader-panel {
  font-size: @font-size-ctent;
}
